package com.linkwechat.wecom.client;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Request;
import com.dtflys.forest.annotation.Retry;
import com.linkwechat.wecom.domain.dto.customer.EsbFlowerCustomer;
import com.linkwechat.wecom.domain.dto.kf.*;
import com.linkwechat.wecom.retry.WeCommonRetryWhen;

import java.util.List;

/**
 * Created by Administrator on 2022-5-12.
 */

@BaseRequest(baseURL = "${esbServerUrl}${esbScrm}")
@Retry(maxRetryCount = "3", maxRetryInterval = "1000", condition = WeCommonRetryWhen.class)
public interface EsbClient {
    //获取会话状态
    @Request(url = "/getWeworkKfCompany",
            type = "POST"
    )
    List<WeKfCompanyResDto> syncKfAccount(@JSONBody WeKfCompanyDto weKfAdminDto);

    //同步客服链接及企业id
    @Request(url = "/syncWeKfContactWay",
            type = "POST"
    )
    void syncContactWay(@JSONBody WeKfSyncContactWayDto weKfSyncContactWayDto);

    //根据租户ID获取客服手机号和memberId
    @Request(url = "/getMobileAndMemberByTenant",
            type = "POST"
    )
    List<WeKfTenantResDto> getMobileAndMemberByTenant(@JSONBody WeKfTenantDto weKfTenantDto);

    //同步memberId所属的企微客服状态
    @Request(url = "/updateKfActivate",
            type = "POST"
    )
    void updateKfActivateSeq(@JSONBody WekfKfActivate wekfKfActivate);

    //同步企业外部联系人关系
    @Request(url = "/syncFlowerCustomer",
            type = "POST"
    )
    void syncFlowerCustomer(@JSONBody EsbFlowerCustomer esbFlowerCustomer);

}
